//
//  ViewController.m
//  PureProject
//
//  Created by Tung Tran on 4/22/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "ViewController.h"
#import "SettingViewController.h"
#import "ReportViewController.h"
#import "AnalysisViewController.h"

@interface ViewController ()

@end

@implementation ViewController


#pragma mark - Button Menu
- (IBAction)btnReportIsPressed:(id)sender
{
    ReportViewController *reportView = [[ReportViewController alloc] initWithNibName:@"ReportViewController" bundle:nil];
    UINavigationController *reportNavView = [[UINavigationController alloc] initWithRootViewController:reportView];
    [reportView release];
    
    [reportNavView setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
    [self presentModalViewController:reportNavView animated:YES];
    [reportNavView release];
}

- (IBAction)btnAnalysisIsPressed:(id)sender
{
    AnalysisViewController *analysisView = [[AnalysisViewController alloc] initWithNibName:@"AnalysisViewController" bundle:nil];
    [analysisView setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
    [self presentModalViewController:analysisView animated:YES];
    [analysisView release];
}

- (IBAction)btnSettingIsPressed:(id)sender
{
    SettingViewController *settingView = [[SettingViewController alloc] initWithNibName:@"SettingViewController" bundle:nil];
    UINavigationController *settingNavView = [[UINavigationController alloc] initWithRootViewController:settingView];
    [settingView release];
    
    [settingNavView setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
    [self presentModalViewController:settingNavView animated:YES];
    [settingNavView release];
}

- (IBAction)btnAboutIsPressed:(id)sender
{
    
}

#pragma mark -
- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

@end